package com.brsya.movie.model;


import com.brsya.base.base.Contents;
import com.brsya.base.bean.BaseListBean;
import com.brsya.base.bean.CategoryBean;
import com.brsya.base.bean.MovieBean;
import com.brsya.base.net.RetrofitClient;
import com.brsya.movie.contract.CategoryContract;

import java.util.Map;

import io.reactivex.rxjava3.core.Observable;

/**
 * Created by Brsya
 * CreateDate: 2022/5/8  20:05
 * Description:
 * 分类筛选页
 */
public class CategoryModel implements CategoryContract.Model {

    @Override
    public Observable<BaseListBean<MovieBean>> getMovieList(Map<String, Object> par) {
        return RetrofitClient.getInstance().getApi().getMovieListByCondition(Contents.BASE_URL + "/videos/getVideos", par);
    }

    @Override
    public Observable<BaseListBean<CategoryBean>> getCategory(Map<String, Object> par) {
        return RetrofitClient.getInstance().getApi().getCategory(Contents.BASE_URL + "/videos/getCategoryByAll", par);
    }
}
